<?php

namespace App\Imports;

use Illuminate\Support\Facades\Schema;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithCalculatedFormulas;

abstract class CommonImport implements ToCollection,WithCalculatedFormulas
{
    public $count = 0;
    public $countSuccess = 0;
    public $countFail = 0;
    public $records = [];
    public $success = true;
    public $msg = '成功！';
    public $params;



    protected $instance;

    protected function getAllCols(){
        return Schema::getColumnListing($this->instance->getTable());
    }
}
